﻿using NUnit.Framework;
using TechTalk.SpecFlow;

namespace Matrix.Data.Tests
{
    [Binding]
    public class MatrixData_TC07_Steps
    {
       private string _inputMatrix;
        [When(@"I calculate the determinant of Matrix '(.*)'")]
        public void WhenICalculateTheDeterminantOfMatrix(string inputMatrix)
        {
           _inputMatrix = inputMatrix;
        }

        [Then(@"the result should be (.*)")]
        public void ThenTheResultShouldBe(double result)
        {
           var testMatrix = ScenarioContext.Current[_inputMatrix] as Matrix;
           var test = testMatrix.Det();
           Assert.That((result - testMatrix.Det()) <= double.Epsilon);
        }
    }
}
